// ContourBitmap.h: interface for the CContourBitmap class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_CONTOURBITMAP_H__6766CF93_95D1_4063_9B92_442D9E19B0C5__INCLUDED_)
#define AFX_CONTOURBITMAP_H__6766CF93_95D1_4063_9B92_442D9E19B0C5__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CContourBitmap : public CBitmap  
{
public:
	// ctor/dtor
	CContourBitmap();
	virtual ~CContourBitmap();

	// Create an irregular region using the given "transparent" color.
	// If the transparent color is CLR_DEFAULT, use the color of the
	// topleft pixel of the bitmap.
	HRGN CreateRegion(COLORREF colorTransp=CLR_DEFAULT);

	// Create an irregular region using the "transparent" color at
	// the given point within the image.
	HRGN CreateRegion(CPoint pntTransparentColor);

	// Get rectangular size of full bitmap
	CSize GetSize();

	// Copy bitmap to given dc with optional offset
	BOOL Paint(CDC* pDC, int nXDest=0, int nYDest=0);

private:
	// Internal helper function used by the different CreateRegion overloads
	HRGN InternalCreateRegion(CDC* pDC, COLORREF colorTransp);
};

#endif // !defined(AFX_CONTOURBITMAP_H__6766CF93_95D1_4063_9B92_442D9E19B0C5__INCLUDED_)
